Using jquery to restore tables containing rowspan and colspan, you can refer to the following requirements to learn about jquery.
Restore a table containing rowspan and colspan.
For example, the original table is:
The restored table is:
Code principle
Traverse the table. If the r
Requirement
Restore a table containing rowspan and colspan.
For example, the original table is:
The restored table is:
Code principleTraverse the table. If the rowspan attribute value of td is greater than 1, add td to the sibling element of the parent element of the current td. If the colspan attribute value of td i
Demand
Restores the table containing rowspan and colspan.
For example, the original table is:
The table after the restore is:
Code principles
The table is traversed, if the TD's RowSpan property value is greater than 1, then to the current TD's parent element of the sibling add TD, if the TD's Colspan property val
PHPWord (http://phpword.codeplex.com/) is a good tool to process and generate word documents, but to generate complex word, such as the implementation of colspan and rowspan, you still need to make some modifications.
PHPWord (http://phpword.codeplex.com/) is a good tool to process and generate word documents, but to generate complex word, such as the implementation of
Rowspan and colspan
Usage of rowspan and colspan:
A table is a powerful tool for organizing data. A table has two attributes: rowspan and colspan. These two attributes can be used to merge cells, the following describes the functi
Colspan and rowspan can change the appearance of a table and merge a column or row.
Set
Rowspan sets the first row so that the Set columns span multiple rows.
Colspan makes the set columns cross multiple columns for any row
Rowspan:
HYBRID:
such as setting the Class property
Copy Code code as follows:
El.setattribute (' class ', ' abc ');
The style "ABC" in IE6/7 will not work, although using El.getattribute (' class ') can fetch the value "ABC".
Also as for property
Copy Code code as follows:
We know that when lab sets the for attribute, clicking on the label automatically selects the corresponding checkbox. But the above settings in IE6/7 click will not check checkbox.
A similar situa
colspan和rowspan这两个属性用于创建特殊的表格。colspanis the abbreviation for column span (cross-column). colspan attribute is used in the TD label to specify the number of columns that the cell spans horizontally :The following will be displayed in the browser:
Cell 1
Cell 2
Cell 3
Cell 4
The example
Both the colspan and rowspan properties are used to create special tables. colspan is the abbreviation for column span (cross-column). The Colspan property is used in the TD tab to specify the number of columns that the cell crosses across: Cell 1 cell 2 cell 3 cell 4 The example makes the cell span three columns by se
For example, set the class attribute.
Copy codeThe Code is as follows: el. setAttribute ('class', 'abc ');
In IE6/7, the style "abc" does not work, although the value "abc" can be obtained using el. getAttribute ('class ".
Another example is for attributes.Copy codeThe Code is as follows:
We know that when the for attribute is set for lab, clicking label will automatically select the corresponding checkbox. However, when you click IE6/7, the checkbox is not selected.
Similar cases occur on cell
are in the same row, while cell 3 and cell 4 form two independent rows.
Integrated instance
SS
Width = "200">> SS
Width = "25%" type = "codeph" text = "/codeph"> Width = "25%" type = "codeph" text = "/codeph"> Width = "25%" type = "codeph" text = "/codeph"> Width = "25%" type = "codeph" text = "/codeph"> Width = "25%" rowspan = "2"> Width
colspanAnd rowspan These two properties are used to create special tables.colspanThe number of columns used to specify the horizontal span of the cell: colspan is the merge column, and the colspan=2 is to merge two columns.rowspan用来Specify the number of rows that the cell spans vertically: rowspan is used to merge rows
Phpword (http://phpword.codeplex.com/) is a great tool for working with and generating word documents, but generating complex word, such as colspan and rowspan implementations, requires some modification. First step: Add the following properties to the Phpword/style/cell.php file class:Private $_gridspan;//for the colspanPrivate $_vmerge;//for the rowspan Step
For example, set the class attribute.Copy codeThe Code is as follows: el. setAttribute ('class', 'abc ');In IE6/7, the style "abc" does not work, although the value "abc" can be obtained using el. getAttribute ('class ".Another example is for attributes.Copy codeThe Code is as follows: We know that when the for attribute is set for lab, clicking label will automatically select the corresponding checkbox. However, when you click IE6/7, the checkbox is not selected.Similar cases occur on cellspaci
DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd ">HTML>Head> Metahttp-equiv= "Content-type"content= "Text/html;charset=utf-8"> title>Merge cells up and down with the Colspan,rowspan propertytitle>Head>Body>Tablewidth= "400px"Border= "1"Align= "Center" cellspacing= "1" cellpadding= "> TR> TDrowspan= "2">A1BR>B1TD> TD>A2TD> TD>A3
Table2csv: Convert tables to CSV dataParameters: A JSON object{' Repeatchar ': ' Split cell padding character ',//default is NULL to populate cell values in each split cell, if given string is populated with a given string' Callback ': ' Callback function '//passed in two parameters (Csv,data), respectively, CSV string and data two-dimensional array}(function ($) {$.fn.table2csv=function (option) {if (option==null) option={}; if (option.repeatchar== ") Option.repeatchar= "-";//Calculate row numb
Environment:Easyui 1.4.2.Phenomenon:When using the DataGrid control with jquery Easyui, you use the way you specify columns dynamically, with the following code:$ ("#topApList"). DataGrid ({columns:[[{field: ' AAA ', title: ' AAA ', align: ' center ', width:130},{field: ' BBB ', title: ' BBB ', align: ' center ', width:100} ,]]});An error occurred while opening the page in the IE8 browser:' Rowspan ' is empty or not an object, '
Reference declaration:
The essence of this effect is to use CSS to remove borders without the grouping function.
Code passed test in IE6-8, ff3
Code depends on extjs 3.x
1. Add a CSS styleJava code
/* Rowspan grid merge row effect */
. Rowspan-grid. x-grid3-body. x-grid3-row {
Border: none;
Cursor: default;
Width: 100%;
}
. Rowspan-grid. x-grid3-header.
ArticleDirectory
Starting from
Program
Save as Js for future use
Use him
Starting from
Today, I have a requirement. I have a temporary table for rowspan. The program is ASP. If the operator is handled during table production, the program may be more difficult to handle than the operator. As a result, it is easy to use a jquery FN to do this. Program
The program does not require permission. The caller must be a collection of all
After using the gridview, you should have more or less such a requirement, that is, some duplicate rows may be used to combine rowspan, it should be easy to find such a solution on the Internet. But since it is something that may often be used, it is better to extract it into a public function. When it is not needed, it is better to call the function directly.
In the Order Details Example of our North Region data, select the first 50 shards, and the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.